package org.tg.model.activity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.tg.enums.ActivityType;
import org.tg.model.base.BaseEntity;

import java.math.BigDecimal;

/**
 * @Author Glow
 * @Date 2023-06-23 15:07:40
 * @Description 活动规则
 * @Version 1.0
 */
@Data
@ApiModel(description = "ActivityRule（活动规则）")
@TableName("activity_rule")
public class ActivityRule extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "类型")
    @TableField("activity_id")
    private Long activityId;

    @ApiModelProperty(value = "活动类型（满减、折扣）")
    @TableField("activity_type")
    private ActivityType activityType;

    @ApiModelProperty(value = "满减金额")
    @TableField("condition_amount")
    private BigDecimal conditionAmount;

    @ApiModelProperty(value = "满减件数")
    @TableField("condition_num")
    private Long conditionNum;

    @ApiModelProperty(value = "优惠金额")
    @TableField("benefit_amount")
    private BigDecimal benefitAmount;

    @ApiModelProperty(value = "优惠折扣")
    @TableField("benefit_discount")
    private BigDecimal benefitDiscount;

    @ApiModelProperty(value = "活动skuId")
    @TableField(exist = false)
    private Long skuId;

    @ApiModelProperty(value = "优惠后减少金额")
    @TableField(exist = false)
    private BigDecimal reduceAmount;

    @ApiModelProperty(value = "选中类型：1：去凑单 2：逛一逛")
    @TableField(exist = false)
    private Integer selectType;

    @ApiModelProperty(value = "规则优惠描述")
    @TableField(exist = false)
    private String ruleDesc;

}

